#ifndef OGREWIDGET_H
#define OGREWIDGET_H

#include <QtCore/QTimer>
#include <QtGui/QApplication>
#include <QtGui/QWidget>
#include <Ogre.h>

class OgreWidget:public QWidget,public Ogre::FrameListener
{
	Q_OBJECT

public:
	OgreWidget(QWidget*parent=0);
protected:
	Ogre::Root *mRoot;
	Ogre::SceneManager* mSceMgr;
	Ogre::RenderWindow* mRenderWindow;
	Ogre::Camera* mCamera;
	Ogre::Viewport* mViewPort;
protected:
	QPaintEngine* paintEngine() const;
	void paintEvent(QPaintEvent *);
	void resizeEvent(QResizeEvent *);
public:
	void initOgre();
	void initCreate();
	Ogre::SceneManager* getSceneMgr(){return mSceMgr;}
};

#endif